<template>
	<view class="mg-15 br-rd-10 bg-white tag  font-size-12" bgColor="#fff">
		<u-cell>
			<view slot="title" class="b font-size-12">
				<text>{{$u.timeFormat(item.createDate, 'yyyy-mm-dd hh:MM')}}</text> <text
					class="" :style="{'color':stateListColors[item.status]}">{{stateList[item.status]}}</text>
			</view>
			<view slot="label" class="mg-top-10 mg-bottom-10">
				<u-grid col="2" :border="false" @click="click">
					<u-grid-item v-for="(item,baseListIndex) in baseList" :key="baseListIndex">
						<view><text class="grid-text  font-size-12">{{item.title}}</text></view>
						<view><text class="font-size-16">{{item.price}}￥</text></view>
					</u-grid-item>
				</u-grid>
			</view>
		</u-cell>
		<u-cell>
			<view slot="title" class="font-size-12 grid-text">
				<text>{{$t('备注')}}</text>
			</view>
			<view slot="label" class=" font-size-12">
				<text> {{item.remark}} </text>
			</view>
		</u-cell>
	</view>

</template>

<script>
	export default {
		props: {
			item: {
				type: Object,
				default: {
					amount: 0,

					id: 0,
					name: "",
					passwortType: 0,
					paySn: "",
					payType: 0,
					remark: "",
					requestAmount: 0,
					serviceCharge: 0,
					sn: "",
					status: 0,
					taxes: 2

				}
			}
		},
		data() {
			var item = this.item;
			console.log("Item", item)
			return {
				baseList: [],
				stateList: {
					1: this.$t("已通过"),
					2: this.$t("审核中"),
					3: this.$t("未通过")
				},stateListColors: {
					1: "#19be6b",
					2:"#ff9900",
					3:"#fa3534"
				}
			}
		},
		mounted: function() {
			var item = this.item;
			console.log("Item1", item)
			this.baseList = [{
					price: item.requestAmount,
					title: this.$t('申请余额'),
				},
				{
					price: item.amount,
					title: this.$t('可用余额'),
				}
				/* ,
								{
									price: item.taxes,
									title: this.$t('taxes'),
								},
								{
									price: item.serviceCharge,
									title: "服务费",
								} */
			]
		}
	}
</script>

<style>
	.b {

		display: flex;
		justify-content: space-between;
	}

	.tag {
		overflow: hidden;
	}
	.grid-text{
		color: #909399;
	}
</style>